//
//  RecommendViewController.m
//  Dome
//
//  Created by 沙斌 on 16/5/5.
//  Copyright © 2016年 Dxy. All rights reserved.
//

#import "RecommendViewController.h"
#import <Masonry.h>
@interface RecommendViewController ()

@end

@implementation RecommendViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     self.view.backgroundColor =[UIColor whiteColor];
    [self addItem];
    [self viewfram];
   
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




-(void)addItem{
    
    self.ct = [[UIImageView alloc]init];
    self.ct.image = [UIImage imageNamed:@"ct"];
    [self.view addSubview:self.ct];
    
    self.yl = [[UIImageView alloc]init];
    self.yl.image = [UIImage imageNamed:@"ct"];
    [self.view addSubview:self.yl];
    
    self.gw = [[UIImageView alloc]init];
    self.gw.image = [UIImage imageNamed:@"ct"];
    [self.view addSubview:self.gw];
    
    self.ctLabel = [[UILabel alloc]init];
    self.ctLabel.textColor =[UIColor colorWithRed:255/255.0 green:54/255.0 blue:0/255.0 alpha:1];
    self.ctLabel.text=@"人气餐厅";
        self.gwText.font = [UIFont systemFontOfSize:9];
    [self.view addSubview:self.ctLabel];
    
    self.ylLabel = [[UILabel alloc]init];
    self.ylLabel.textColor =[UIColor colorWithRed:255/255.0 green:54/255.0 blue:0/255.0 alpha:1];
    self.ylLabel.text=@"人气娱乐";
        self.gwText.font = [UIFont systemFontOfSize:9];
    [self.view addSubview:self.ylLabel];
    
    self.gwLabel = [[UILabel alloc]init];
    self.gwLabel.textColor =[UIColor colorWithRed:255/255.0 green:54/255.0 blue:0/255.0 alpha:1];
    self.gwLabel.text=@"人气购物";
        self.gwText.font = [UIFont systemFontOfSize:9];
    [self.view addSubview:self.gwLabel];
    
    self.ctText = [[UILabel alloc]init];
    self.ctText.textColor =[UIColor colorWithRed:150/255.0 green:150/255.0 blue:150/255.0 alpha:1];
    self.ctText.text=@"月度人气餐厅";
    self.ctText.font = [UIFont systemFontOfSize:7];
    [self.view addSubview:self.ctText];
    
    self.ylText = [[UILabel alloc]init];
    self.ylText.textColor =[UIColor colorWithRed:150/255.0 green:150/255.0 blue:150/255.0 alpha:1];
    self.ylText.text=@"月度人气娱乐";
    self.ylText.font = [UIFont systemFontOfSize:7];
    [self.view addSubview:self.ylText];
    
    self.gwText = [[UILabel alloc]init];
    self.gwText.textColor =[UIColor colorWithRed:150/255.0 green:150/255.0 blue:150/255.0 alpha:1];
    self.gwText.text=@"月度人气购物";
    self.gwText.font = [UIFont systemFontOfSize:7];
    [self.view addSubview:self.gwText];
    
    
}

-(void)viewfram{

 [self.yl mas_makeConstraints:^(MASConstraintMaker *make) {
     make.centerX.equalTo(self.view.mas_centerX);
     make.width.equalTo(@80);
     make.height.equalTo(@50);
     make.bottom.equalTo(self.view.mas_bottom).with.offset(-15);
 }];

 [self.ct mas_makeConstraints:^(MASConstraintMaker *make) {
     make.right.equalTo(self.yl.mas_left).with.offset(-(self.view.frame.size.width/3-80));
     make.width.equalTo(self.yl.mas_width);
     make.height.equalTo(self.yl.mas_height);
     make.bottom.equalTo(self.yl.mas_bottom);
 }];
    
    [self.gw mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.yl.mas_right).with.offset(self.view.frame.size.width/3-80);
        make.width.equalTo(self.yl.mas_width);
        make.height.equalTo(self.yl.mas_height);
        make.bottom.equalTo(self.yl.mas_bottom);
    }];
    
    
    [self.ctText mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.ct.mas_left);
        make.width.equalTo(self.ct.mas_width);
        make.height.equalTo(@7);
        make.bottom.equalTo(self.ct.mas_top).with.offset(-10);;
        
    }];
    
    [self.ylText mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.yl.mas_left);
        make.width.equalTo(self.yl.mas_width);
        make.height.equalTo(@7);
        make.bottom.equalTo(self.yl.mas_top).with.offset(-10);;
        
    }];
    
    [self.gwText mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.gw.mas_left);
        make.width.equalTo(self.gw.mas_width);
        make.height.equalTo(@7);
        make.bottom.equalTo(self.gw.mas_top).with.offset(-10);;
        
    }];
    
    [self.ctLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.ct.mas_left);
        make.right.equalTo(self.ct.mas_right);
        make.bottom.equalTo(self.ctText.mas_top).with.offset(-5);
        make.height.equalTo(@9);
    }];
    
    [self.ylLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.yl.mas_left);
        make.right.equalTo(self.yl.mas_right);
        make.bottom.equalTo(self.ylText.mas_top).with.offset(-5);
        make.height.equalTo(@9);
    }];

    
    [self.gwLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.gw.mas_left);
        make.right.equalTo(self.gw.mas_right);
        make.bottom.equalTo(self.gwText.mas_top).with.offset(-5);
        make.height.equalTo(@9);
    }];


}


@end
